

ac.skill('Boss2-1'){
    cool = 8,
    title = '雷电践踏',
    targettype = '点',
    range = 1200,
    casttime = 0,
    animation = 'attack',
    model1 = [[BOSS2_ldjt.mdl]],
    model2 = [[BOSS2_ldjthy.mdl]],
    model3 = [[BOSS2_ldjtcf.mdl]],
    on_cast_shot = function(self)
        local hero = self.owner
        local point1 = hero:get_point()
        local point2 = self.target:get_point()
        local time = 0.8
        local time2 = time +( point1*point2)/1200
        ac.hint_red(point2,500,time2)
        hero:add_buff '技能蓄力'{
            time = time,
            skill = self,
        }
        local mover = ac.mover('point'){
            target = point2,
            mover = hero,
            speed = 2400,
            on_move = function(_,point)
                if point then
                    point:effect{
                        model = self.model3,
                        angle = angle,
                        time = 0.2,
                    }
                end
            end,
            on_remove = function()
                if hero:is_alive() then
                    local damage = hero:get('攻击') * 5
                    local point = hero:get_point()
                    point:effect{
                        model = self.model1,
                        size = 2,
                        time = 0.2,
                    }
                    point:effect{
                        model = self.model2,
                        time = 0.2,
                    }
                    hero:aoe_damage(point,500,damage)
                end
            end
        }
        mover:set_pause(true)
        ac.wait(time*1000,function()
            hero:get_point():effect{
                model = self.model2,
                hide_when_remove = true,
                time = 0.2,
            }
            mover:set_pause(false)
        end)
    end,
}


ac.skill('Boss2-2'){
    title = '闪电飞轮',
    range = 1200,
    cool = 8,
    animation = '',
    casttime = 0,
    model1 = [[BOSS2_sdfl.mdl]],
    model3 = [[BOSS2_ldjtcf.mdl]],
    on_cast_shot = function(self)
        local hero = self.owner
        local time = 1
        local point = hero:get_point()
        hero:add_buff '技能蓄力'{
            time = time,
            skill = self,
        }
        local num = 6
        local lock = {}
        local damage = hero:get('攻击') * 10
        for a=1,num do
            local angle = a / num * 360
            ac.hint_line(point,angle,time)
            ac.wait(time*1000,function()
                local mvr = point:launch_wave(self.model1,angle,1050,900,nil,150)
                local count = 0
                mvr.on_move = function(_,point)
                    count = count + 1
                    hero:aoe_damage(point,150,damage,self,lock)
                    if point and count%4==0 then
                        point:effect{
                            model = self.model3,
                            angle = angle,
                            time = 0.2,
                        }
                    end
                end
            end)
        end
    end,
}
